// Name: David Andersen

using UnityEngine;
using System.Collections;

public class TitleGUI : MonoBehaviour {
	
	public GUISkin guiSkin;
	public GameObject controller;
	
	void Start () {
		controller = GameObject.Find("Controller");
	}
	
	void OnGUI () {
		GUI.skin = guiSkin;
						
		GUILayout.BeginArea(new Rect(Screen.width / 2 - 150, Screen.height / 2 - 150, 300, 300));
		GUILayout.BeginVertical();
		GUILayout.Box("Kaboom!");
		GUILayout.BeginHorizontal();
		if(GUILayout.Button("Easy"))
		{
			controller.GetComponent<Controller_Script>().enemySpeed = 100;
			controller.GetComponent<Controller_Script>().reloadTime = 40;
			controller.GetComponent<Controller_Script>().bucketCount = 4;
			Application.LoadLevel("Kaboom");
		}
		if(GUILayout.Button("Normal"))
		{
			controller.GetComponent<Controller_Script>().enemySpeed = 200;
			controller.GetComponent<Controller_Script>().reloadTime = 20;
			controller.GetComponent<Controller_Script>().bucketCount = 3;
			Application.LoadLevel("Kaboom");
		}
		if(GUILayout.Button("Hard"))
		{
			controller.GetComponent<Controller_Script>().enemySpeed = 400;
			controller.GetComponent<Controller_Script>().reloadTime = 10;
			controller.GetComponent<Controller_Script>().bucketCount = 2;
			Application.LoadLevel("Kaboom");
		}
		GUILayout.EndHorizontal();
		GUILayout.EndVertical();
		GUILayout.EndArea();
	}
}
